The Monitors control panel is the user interface for changing the pixel depth, color capabilities, and positions of video devices. Since the user can control the capabilities of the video device, your application should be flexible: although it may have a preferred pixel depth, your application should do its best to accommodate less than ideal conditions.
Your application can use the SetDepth function to change the pixel depth of a video device, but your application should do so only with the consent of the user. If your application must have a specific pixel depth, it can display a dialog box that offers the user a choice between changing to that depth or canceling display of the image. This dialog box saves the user the trouble of going to the Monitors control panel before returning to your application. (See the chapter "Dialog Manager" in Inside Macintosh: Macintosh Toolbox Essentials for more information about creating and using dialog boxes.)
Before calling SetDepth , use the HasDepth function to determine whether the available hardware can support the pixel depth you require. The SetDepth function is described on SetDepth , and the HasDepth function is described on HasDepth .